home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wonky Flux Batch 2019 02
/
Wonky_Flux_Batch_2019-02.zip
/
Wonky Flux Batch 2019-02
/
093 - Land of Spur.dsk
/
SPUR.SHOP.S
< prev
next >
Wrap
Text File
|
2019-02-17
|
20KB
|
564 lines
; _ _ _ _ _ _ _ _ _
;[_][_][_][_][_][_][_][_][_]
;
; The Land of SPUR
;
; (C)opyright 1987
; Greg W. Davis
; and
; Peripherals Plus
;
; 03/14/87 15:41
;___________________________
; v3.0
; Spur Shop Segment
; _ _ _ _ _ _ _ _ _
;[_][_][_][_][_][_][_][_][_]
public main1
; ***************
; * Main Menu *
; ***************
main
gosub set.pa
print \"Entering the SPUR shoppe area"\
main1
on nocar goto dropped
free:gosub tim.chk:if (ev-ex)<120 print \"Dusk approaches..."
if bd gosub scn.dsp
input \"Shoppe (?=Menu): "i$
if i$="?" gosub menu:goto main1
if i$="W" goto armory
if i$="B" goto bank
if i$="V" goto wizard
if i$="S" dy$=dz$+"spur.sub":link dy$,"show2"
if i$="I" dy$=dz$+"spur.sub":link dy$,"show3"
if (i$="Q") or (i$="QUIT") goto quit0
if i$="T" goto termin
if i$="DM" goto feedback
if i$="H" then f$=dx$+"spur.help":gosub show.file:goto main1
if i$="C" then f$=dx$+"spur.winners":gosub show.file:goto main1
if i$="A" then f$=dx$+"spur.log":gosub show.file:goto main1
if i$="L" goto plr.list
if i$="E" then dy$=dz$+"spur.main":cr=1:di=7:link dy$,"travel3"
if i$="G" goto general
if (i$="*") and ((info(5)) or (un=dm)) then dy$=ds$+"spur.sysop":link dy$
print \"Illegal command":goto main1
menu
setint(1):print \s$\'
*^^^^^^^^^* *^^^^^^^^^*
[(^^^^^^^)] ___ ___ ___ [(^^^^^^^)]
| o |___| |__| |__| |___| o |
| |
| The Land of SPUR Commands Menu |
|:::::::::::::::::::::::::::::::::::|
| W: Ye Olde Armory |
| B: Ye Olde Banker |
| V: Visit the Wizard |
| G: General Stores |
| S: Thy Status |
| I: Thy Inventory |
| E: Enter The Land of SPUR |
|:::::::::::::::::::::::::::::::::::|
| H:Help w/SPUR L:List Opponents |
| A:Adventure Log DM:Ye Olde DM |
| C:Past Conquerors of SPUR |
|:::::::::::::::::::::::::::::::::::|
| Q:Quit to BBS T:To Oblivion |
[][][][][][][][][]*[][][][][][][][][]':setint(""):return
; ***************************
; * Send letter to the DM *
; ***************************
feedback
dy$=dm$+"mail"
print \"Feedback to SPUR DM":x=clock(2):clock(2)=0
print \"Enter Thy message now, Type thee 'done'"
print "when all is well!"
edit(0):edit(1)
if not edit(2) then clock(2)=x:goto main1
h$="-> Feedback from The Land of SPUR <-"
print \"Wait...";: ready dy$
if info(6)<29 print \"Mail bit-map full":goto main1
print #msg(dm),un:if h$<>"" print #6,h$\
print #6,"From ->"n1$" (#"un")"
print #6,"Date ->"date$" "time$\
copy #8,#6:print #msg(dm),chr$(4);chr$(0);
msg(dm)=1:update:print ".feedback saved":clock(2)=x
goto main1
; ****************************
; * List of System Players *
; ****************************
plr.list
print \"List of players in Game"
input @2 \"Match letters or CR for all: "i$
x=1:dy$=dx$+"spur.users"
a=1:dr$=dx$+"room.level"+str$(a):ready dr$
open #1,dy$
gosub plrlist5
plrlist1
position #1,130,x
input #1,n$,l1,b1,b2,b3,b4
input #1,n1,n2,n3,n4,n5,n6
input #1,g1,g2,f,f,f,f,f,f,f1,f2,m,m1
setint(1)
if (not l1) goto plrlist4
if not instr(i$,n$) goto plrlist4
if x=pn then b2=cl:lo$="Shoppe":m=mm:f2=mk:b4=hp:f1=ep:n1=ps:n2=pt:n3=pi:n4=pe:n5=pw:n6=pd:g1=gh:g2=gl:goto plrlist2
if b3=0 then lo$="Shoppe":goto plrlist2
if a<>b2 then dr$=dx$+"room.level"+str$(b2):ready dr$:a=b2
input #msg(b3),lo$,f
setint(1)
plrlist2
gosub prt.gold
print right$(" "+str$(b1),3)" ";
print left$(n$+" ",15)" ";
print "$"gd$" ";
print right$(" "+str$(f2),4)" ";
print right$(" "+str$(m),4)" ";
print right$(" "+str$(b2),3)"-"lo$
plrlist4
x=x+1:if (x>np) or (key(1)) close:goto main1
goto plrlist1
plrlist5
print \\" # Adventurer Gold/Hand Kills Moves Dungeon Level/Room"
print "--- --------------- ---------- ----- ----- -----------------------------"
return
; *****************************************
; * Buy Weapon/Protection - Sell Weapon *
; *****************************************
armory
print \'
Wouldst thou be interested in
[P]rotection or [W]eapondry? ';
input @2 i$
if i$="P" goto protect
if i$="W" goto weapons0
print \"Then BEGONE!!":goto main1
weapons0
dy$=dx$+"weapons":open #1,dy$
position #1,34,0:input #1,nw
weapons
print \"Speak "n1$"!"
input @2\"Wouldst Thou [B]uy or [S]ell? "i$
if i$="B" goto buy.wep
if i$="S" goto sel.wep
print \"Then BEGONE!!":goto wp.exit
; ******************
; * Buy a Weapon *
; ******************
buy.wep
if xw<6 goto buy1
print \'
I am sorry, but you have no room for
more weapons. Do you wish to sell a
weapon? ' ;:input @0 i$
if i$<>"Y" goto wp.exit
goto sel.wep
buy1
print \'
Excellent! Choose Thee well!! From mine
hands I have crafted this list of fine
weapons!'
buy2
input @2\"Your Choice (?=List): "i$
if i$="?" gosub wep.list:goto buy2
if i$="" goto weapons
x=val(i$):if (x<1) or (x>wc) goto buy2
position #1,34,x
input #1,cb$:if cb$<>"2" print \"Weapon not available for sale!":goto buy2
input #1,w$\s,d,v:w$=mid$(w$,3)
print \"You chose "w$" for "v" gold"\
xa$=right$("000"+str$(x),3)+","
a=instr(xa$,xw$)
if a print \'
I see that you already possess this
weapon. You may NOT buy another.':goto buy2
input @0"Correct? "i$:if i$<>"Y" goto buy2
g3=gh:g4=gl:g1=0:g2=v:gosub chk.gold
if a=0 print \"Sorry to say, but you do not have"\"enough gold at hand":goto buy2
buy4
xw=xw+1:xw$=xw$+xa$
if x<=10 goto buy5
nw=nw-1
position #1,34,x:print #1,0
buy5
print \"DONE!"
gosub sub.gold:g1=gh:g2=gl:gosub prt.gold:print \"You now have "gd$" in gold."
if xw=6 print \"No more room for weapons!":goto buy.wep:else goto buy2
; *******************
; * Sell a Weapon *
; *******************
sel.wep
wr$=""
x=0:if xw=0 print \"No weapons.":goto weapons
print \"Sell which weapon:"\\
for i=1 to xw:y=(i*4)-3:x=val(mid$(xw$,y))
position #1,34,x:input #1,cb$\w$:w$=mid$(w$,3)
print i". "w$
next
input @2\"Which : "i$:if i$="" goto weapons:else x=val(i$)
if (x<1) or (x>xw) goto sel.wep
y=(x*4)-3
x=val(mid$(xw$,y))
if nw=25 print \"My weapons inventory is full.":goto weapons
position #1,34,x:input #1,cb$\w$\s,d,v
if cb$="2" print \"I already have a "mid$(w$,3)".":goto weapons
a=v/16:l=a*pi:if l=>v then l=a*14
if pi=0 then l=a
print \"I will give you "l" gold for it."\
input @0 "Doest Thou accept MY offer? "i$
if i$<>"Y" goto weapons
print \"Good!":g2=l:gosub add.gold
xw=xw-1
if xw=0 then xw$="":goto wr.weap
l=len(xw$)
if y=1 then xw$=mid$(xw$,5):goto wr.weap
if (y+4)>l then xw$=left$(xw$,y-1):goto wr.weap
xw$=left$(xw$,y-1)+mid$(xw$,y+4)
wr.weap
nw=nw+1
position #1,34,x:print #1,"2"
goto weapons
; *** List Weapons ***
wep.list
print \'
The Weapons Master leads you to a table
where his handcrafted weapons lay....'\
b=0:x=1:print
w.list2
position #1,34,x
input #1,cb$\w$\s,d,v
setint(1)
if cb$<>"2" goto w.list3
w$=mid$(w$,3)
print right$(" "+str$(x),3)". "left$(w$+" ",20)" - "right$(" "+str$(v),4)" Gold"
b=b+1
w.list3
x=x+1:if (b=nw) or (x>wc) return
if (key(1)) return
goto w.list2
wp.exit
position #1,34,0
print #1,nw
close:goto main1
; ***********************
; * Buy Armor/Shields *
; ***********************
protect
print \'The Weapons Master greets you and says:
"Welcome, Adventurer!! Choose from this
fine list of protection for your long
journey!"'\
dy$=dx$+"items":open #1,dy$
x=1
pro1
position #1,30,x:input #1,cb$:if cb$="*" goto pro1a
input #1,it$\it:it=it*100:it$=left$(mid$(it$,3)+" ",20)
print right$(" "+str$(x),3)". "it$" - "right$(" "+str$(it),5)" Gold"
pro1a
x=x+1:if x>5 goto pro2
goto pro1
pro2
if xi=15 print \"You have no room in your pack!":close:goto main1
input @2\"Your Choice (?=List): "i$:if i$="" close:goto main1
if i$="?" then x=1:print:goto pro1
x=val(i$):if (x<1) or (x>5) goto pro2
position #1,30,x:input #1,cb$:if cb$="*" goto pro2
input #1,it$\it:it=it*100
g3=gh:g4=gl:g1=0:g2=it:gosub chk.gold:if a=0 print \"You do not have enough gold.":goto pro2
a$=mid$(it$,3)
print \"You choose "a$" for "it" gold? ";:input @0 i$
if i$<>"Y" goto pro2
xa$=right$("000"+str$(x),3)+","
a=instr(xa$,xi$):if a print \"I see you already have "a$"."\"You may buy no more.":goto pro2
print \"Done!":g2=it:gosub sub.gold
xi=xi+1:xi$=xi$+xa$:goto pro2
; ********************
; * General Stores *
; ********************
general
print \'The Stores Master greets you and says:
"Welcome, Adventurer!! Have you come to
buy goods for your journey through the
Land?" ' ;:input @0 i$
if i$<>"Y" goto main1
dy$=dx$+"stores":open #1,dy$
print \"Good!! What will you have today?"\
x=1
gen1
position #1,26,x:input #1,cb$:if cb$="*" goto gen1a
input #1,gs$\gs:gs$=mid$(gs$,3)
print right$(" "+str$(x),3)". "left$(gs$+" ",18)" - "right$(" "+str$(gs),5)" Gold"
gen1a
x=x+1:if x>10 goto gen2
goto gen1
gen2
if xf=10 print \"You have no room in your pack!":close:goto main1
input @2\"Your Choice (?=List): "i$:if i$="" close:goto main1
if i$="?" then x=1:print:goto gen1
x=val(i$):if (x<1) or (x>10) goto gen2
position #1,26,x:input #1,cb$:if cb$="*" goto gen2
input #1,gs$\gs
g3=gh:g4=gl:g1=0:g2=gs:gosub chk.gold:if a=0 print \"You do not have enough gold.":goto gen2
a$=mid$(gs$,3)
print \"You choose "a$" for "gs" gold? ";:input @0 i$
if i$<>"Y" goto gen2
xa$=right$("000"+str$(x),3)+","
a=instr(xa$,xf$):if a print \"I see you already have "a$"."\"You may buy no more.":goto gen2
print \"Done!":g2=gs:gosub sub.gold
xf=xf+1:xf$=xf$+xa$:goto gen2
; ********************
; * Ye Olde Banker *
; ********************
bank
print \"[ Ye Bank of SPUR ]"
g1=bh:g2=bl:gosub prt.gold:print \"In Account :"gd$" gold"
g1=gh:g2=gl:gosub prt.gold:print \"In hand :"gd$" gold"
input @2\"[D]eposit or [W]ithdraw? "i$:if i$="" goto main1
if i$="W" goto bank3
if i$<>"D" goto bank
input @2 \"[ Deposit ] - How much? "gd$:if gd$="" goto main1
gosub val.gold:if a=0 print \"Invalid amount!":goto bank
gosub spl.gold:g3=gh:g4=gl:gosub chk.gold:if a=0 print \"You don't have that much!":goto bank
bank2
gosub put.gold
goto bank5
bank3
input @2 \"[ Withdraw ] - How much? "gd$:if gd$="" goto main1
gosub val.gold:if a=0 print \"Invalid amount!":goto bank
gosub spl.gold:g3=bh:g4=bl:gosub chk.gold:if a=0 print \"You don't have that much!":goto bank
bank4
gosub tak.gold
bank5
g1=bh:g2=bl:gosub prt.gold:print \"In Account: "gd$" gold"
g1=gh:g2=gl:gosub prt.gold:print "In hand : "gd$" gold"\\:goto main1
; *******************
; * Learn a Spell *
; *******************
wizard
if xs=10 goto wiz2b
dy$=dx$+"spells"
print \'
You enter the cave of the Wizard, a
dis-embodied voice asks.....
"Are you here to learn a spell"? ';
input @0 i$:if i$<>"Y" print \"Return when you are ready.":goto main1
print \'
A scroll appears before you, and the
voice pronounces...'\\
x=1:open #1,dy$
wiz1a
position #1,40,x
input #1,cb$\q$,q2$,q3,q4
setint(1)
if (cb$="*") or (cb$="") goto wiz1b
print right$(" "+str$(x),3)". "left$(q$+" ",20)" - "right$(" "+str$(q4),5)" Gold"
wiz1b
x=x+1:if (x>sc) or (key(1)) close:goto wiz1c
goto wiz1a
wiz1c
print \"Choose carefully your spells to learn."\
wiz2
input @2\"Learn which spell? (?=List): "i$
if i$="?" print \md$\:x=1:open #1,dy$:goto wiz1a
if i$="" goto main1:else x=val(i$)
if (x<1) or (x>sc) goto wiz2
open #1,dy$:position #1,40,x
input #1,cb$\q$,q2$,q3,q4:close
if cb$="*" print \"I do not know that spell.":goto wiz2
print \"You have chosen "q$" for "q4" gold"
input @0\"Is this correct? "i$
if i$<>"Y" goto wiz2
g3=gh:g4=gl:g1=0:g2=q4:gosub chk.gold
if a=0 print \"Ye do not have enough gold.":goto wiz2
wiz2b
if xs=10 print'
I am sorry but ye have already learned
ten spells.'\:goto main1
wiz3
print \"Teaching spell..";
for a=1 to 50
if not (a mod 5) print ".";
next
gosub sub.gold
b=56:if pi<5 print \'
Thy intelligence may hinder thee from
learning this spell.'\:b=100
a=random(100):if (a>50) and (a<b) print \'
Thou hast not paid close attention
to my lessons. My efforts to teach
thee were in vain...':goto wiz2
print \'
Spell taught, use it wisely, for it may
only be used ONCE!'
xs=xs+1
a$=right$("000"+str$(x),3)+","
xs$=xs$+a$
goto wiz2
; ***************
; * Show File *
; ***************
show.file
setint(1):print \s$\:copy f$:setint(""):return
; **********************
; * Gold Subroutines *
; **********************
add.gold
gl=gl+g2:if gl=>10000 then gl=gl-10000:gh=gh+1
return
sub.gold
if g2>gl then gl=gl+10000:gh=gh-1
gl=gl-g2:return
put.gold
bh=bh+g1
bl=bl+g2:if bl=>10000 then bl=bl-10000:bh=bh+1
if g2>gl then gl=gl+10000:gh=gh-1
gh=gh-g1:gl=gl-g2
return
tak.gold
if g2>bl then bl=bl+10000:bh=bh-1
bh=bh-g1:bl=bl-g2
gh=gh+g1
gl=gl+g2:if gl=>10000 then gl=gl-10000:gh=gh+1
return
prt.gold
a$=str$(g1):gd$="0000":if g1=0 then gd$=" ":a$=" "
gd$=right$(" "+a$,5)+right$(gd$+str$(g2),4)
return
spl.gold
gd$=right$("00000000"+gd$,9)
g1=val(left$(gd$,5)):g2=val(right$(gd$,4))
return
chk.gold
a=0
if g3>g1 then a=1:return
if (g3=g1) and (g4=>g2) then a=1:return
return
val.gold
l=len(gd$)
for i=1 to l:a=instr(mid$(gd$,i,1),"0123456789")
if (not a) then i=l:next:return
next:return
; ***************************
; * Set Player Attributes *
; ***************************
set.pa
pa=ps+pd+pt+pi+pw+pe:pa=pa mod 10
return
; **********************
; * Time Subroutines *
; **********************
tim.chk
ex=clock(1)-ew:if ex=>ev pop:goto quit1
return
; ************************
; * Screen Subroutines *
; ************************
scn.dsp
print #3 @4,23 right$(" "+str$(cl),4)
print #3 @13,23 right$(" "+str$(cr),4)
print #3 @21,23 right$(" "+str$(ps),3)
print #3 @29,23 right$(" "+str$(pt),3)
print #3 @37,23 right$(" "+str$(pw),3)
print #3 @4,24 right$(" "+str$(mm),4);
print #3 @13,24 right$(" "+str$(ep),4);
print #3 @21,24 right$(" "+str$(pe),3);
print #3 @29,24 right$(" "+str$(pd),3);
print #3 @37,24 right$(" "+str$(pi),3);
print #3 @1,20
if peek(33)=40 goto scn.rtn
print #3 @45,23 right$(" "+str$(xf),2)
print #3 @51,23 right$(" "+str$(xi),2)
print #3 @57,23 right$(" "+str$(xw),2)
print #3 @63,23 right$(" "+str$(ar),3)
print #3 @70,23 right$(" "+str$(sh),3)
print #3 @77,23 right$(" "+str$(mk),3)
print #3 @45,24 right$(" "+str$(xp),2);
print #3 @51,24 right$(" "+str$((ev-ex)/60),2);
g1=gh:g2=gl:gosub prt.gold:print #3 @57,24 gd$;
print #3 @70,24 right$(" "+str$(df),3);
print #3 @77,24 right$(" "+str$(sr),3);
scn.rtn
print #3 @1,20
return
; ************
; * Logoff *
; ************
termin
print \"Terminate Connection"\\"Are you sure? ";
input @0 " "i$:if i$<>"Y" goto main1
goto dropped
; *****************
; * Link to BBS *
; *****************
quit0
input @0\"Leave the Land of SPUR ? "i$
if i$<>"Y" goto main1
quit1
dy$=dz$+"spur.logon"
link dy$,"quit1"
dropped
dy$=dz$+"spur.logon"
link dy$,"quit3"